package json;

import base.User;
import com.alibaba.fastjson2.JSON;

public class FastjsonDemo {
    public static void main(String[] args) {
        User user = new User();
        user.setName("abc");
        user.setAge(11);
        String s = JSON.toJSONString(user);
        System.out.println("s = " + s);
        User user1 = JSON.parseObject(s, User.class);
        System.out.println("user1 = " + user1);
    }
}
